#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/proc_fs.h>
#include <linux/list.h>
#include <asm/uaccess.h>
#include <linux/udp.h>
#include <linux/tcp.h>
#include <linux/skbuff.h>
#include <linux/ip.h>
#include <linux/netfilter.h>
#include <linux/netfilter_ipv4.h>

#define PROCF_MAX_SIZE 1024
#define PROCF_NAME "minifirewall"
//regula dupa care functioneaza firewall-ull.

struct regula_firewall
{
	unsigned char in_out; /*0:in sau out...1:in packet ....2:out packet*/
	unsigned int src_ip;
	unsigned int src_netmask;
	unsigned int src_port;  //0-95535
	unsigned int dest_ip;
	unsigned int dest_netmask;
	unsigned int dest_port;
	unsigned char proto; //tipul ptotocolului 0:all 1:tcp 2: udp
	unsigned char action; //defineste actiunea 0:block  1:unblock
	
	struct list_head list;
};

struct regula_firewall_bruta 
{
    unsigned char in_out;
    char *src_ip;
    char *src_netmask;
    char *src_port;
    char *dest_ip;
    char *dest_netmask;
    char *dest_port;
    unsigned char proto;
    unsigned char action;
};

//regula curenta dupa care actioneaza firewall-ul.
static struct regula_firewall regula;